<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <style>
        .red{
            color: red;
        }
        .thin{
            font-size: 40px;
        }
        .active{
            background-color: salmon;
            font-size: 40px;
            width: 280px;
            border-radius: 5px;
        }
    </style>
    <div id="app">
        <!-- 通过boll值改变样式 -->
        <div :class="['red','thin',flag?'active':'']">
            今天天气好晴朗
        </div>
    </div>
    <script src="../js/vue.js"></script>
    <script>
        const app =new Vue({
            el:"#app",
            data:{
                flag:true,
                obj:{
                    red:true ,thin:true
                }
            }
        })
    </script>
</body>
</html>